package pl.pkolodziej.platform.controller.session;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.springframework.beans.factory.annotation.Autowired;

import pl.pkolodziej.platform.service.user.UserService;

public class MySessionListener implements HttpSessionListener {

	@Autowired
	public UserService userService;
	
	public void sessionCreated(HttpSessionEvent se) {
		// TODO Auto-generated method stub
		System.out.println("SESSION CREATED"+se.getSession().getId());
	}

	public void sessionDestroyed(HttpSessionEvent se) {
		System.out.println("SESSSION DESTROYED");
	}

}

class SessionTimer implements Runnable{

	public static HttpSession session;
	public void run() {
		System.out.println(":"+session.getLastAccessedTime());
	}
	
}
